package com.houweishi.module.report.service.impl;

import java.util.List;
import com.houweishi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.houweishi.module.report.mapper.BizWorkReportMapper;
import com.houweishi.module.report.domain.BizWorkReport;
import com.houweishi.module.report.service.IBizWorkReportService;

/**
 * 员工工作报告Service业务层处理
 * 
 * @author houweishi
 * @date 2023-02-21
 */
@Service
public class BizWorkReportServiceImpl implements IBizWorkReportService 
{
    @Autowired
    private BizWorkReportMapper bizWorkReportMapper;

    /**
     * 查询员工工作报告
     * 
     * @param id 员工工作报告主键
     * @return 员工工作报告
     */
    @Override
    public BizWorkReport selectBizWorkReportById(Long id)
    {
        return bizWorkReportMapper.selectBizWorkReportById(id);
    }

    /**
     * 查询员工工作报告列表
     * 
     * @param bizWorkReport 员工工作报告
     * @return 员工工作报告
     */
    @Override
    public List<BizWorkReport> selectBizWorkReportList(BizWorkReport bizWorkReport)
    {
        return bizWorkReportMapper.selectBizWorkReportList(bizWorkReport);
    }

    /**
     * 新增员工工作报告
     * 
     * @param bizWorkReport 员工工作报告
     * @return 结果
     */
    @Override
    public int insertBizWorkReport(BizWorkReport bizWorkReport)
    {
        bizWorkReport.setCreateTime(DateUtils.getNowDate());
        return bizWorkReportMapper.insertBizWorkReport(bizWorkReport);
    }

    /**
     * 修改员工工作报告
     * 
     * @param bizWorkReport 员工工作报告
     * @return 结果
     */
    @Override
    public int updateBizWorkReport(BizWorkReport bizWorkReport)
    {
        bizWorkReport.setUpdateTime(DateUtils.getNowDate());
        return bizWorkReportMapper.updateBizWorkReport(bizWorkReport);
    }

    /**
     * 批量删除员工工作报告
     * 
     * @param ids 需要删除的员工工作报告主键
     * @return 结果
     */
    @Override
    public int deleteBizWorkReportByIds(Long[] ids)
    {
        return bizWorkReportMapper.deleteBizWorkReportByIds(ids);
    }

    /**
     * 删除员工工作报告信息
     * 
     * @param id 员工工作报告主键
     * @return 结果
     */
    @Override
    public int deleteBizWorkReportById(Long id)
    {
        return bizWorkReportMapper.deleteBizWorkReportById(id);
    }
}
